<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header');
?>
<script type="text/javascript" language="javascript" src="<?php echo JS_PATH;?>commoncheck.js"></script>
<body onload="munecheck()">
<div class="txt_head_frame">
	<span class="txt_frame_title">增加菜单</span>
</div>
<div id="main_content">
<form name="myform" action="?m=admin&c=menu&a=add" method="post" id="myform">
<div class="txt_content_frame">
	<div class="txt_content_box">
		<div class="txt_content_left">
			<div class="txt_text_left">上一级菜单:<span>[*]</span></div>
			<div class="txt_left_input">
            <select name="info[parentid]" class="select">
			<option value="0">一级菜单</option>
			<?php echo $select_categorys?>
			</select>
			</div><br/><br/>   
			<div class="txt_text_left">菜单名称:<span>[*]</span></div>
			<div class="txt_left_input"><input name="info[name]" type="text" class="txt" id="name" /></div><span id="validatename" class="validate"></span><br/><br/>
            <div class="txt_text_left">模块名:<span>[*]</span></div>
			<div class="txt_left_input"><input name="info[m]" type="text" class="txt" id="m"/></div><span id="validatem" class="validate"></span><br/><br/>
            <div class="txt_text_left">文件名:<span>[*]</span></div>
			<div class="txt_left_input"><input name="info[c]" type="text" class="txt" id="c"/></div><span id="validatec" class="validate"></span><br/><br/>
            <div class="txt_text_left">方法名:<span>[*]</span></div>
			<div class="txt_left_input"><input name="info[a]" type="text" class="txt" id="a"/></div><span id="validatea" class="validate"></span><br/><br/>
            <div class="txt_text_left">是否显示:<span>[*]</span></div>
			<div class="txt_left_input"><input type="radio" name ="info[display]" value="1" checked>是<input type="radio" name="info[display]" value="0">否</div><br/><br/>       
		</div>
	</div>
</div>

<div class="txt_btn">
	<input name="dosubmit" type="submit" class="txt_btn_a" value=" 保存 " />
</div>
</form>
</div>
</body>
<script type="text/javascript">
<!--
//菜单检测
function munecheck(){
	$(':input[type=text]').each(function(){
		$(this).blur(function(){
			if(!isNotNull($(this).val())){
				$(this).parent().next('.validate').html('<img src="images/false.gif" width=16 heigth=16>菜单名不能为空');
			}else {
				$(this).parent().next('.validate').html('<img src="images/true.gif" width=16 heigth=16>');		
			}
		});
	});	
}
//-->
</script>
</html>